###############################################
# === xeno_leader_traits.txt ===
###############################################
###############################
###     Xenomorph Leader Traits     ###
###############################
#
# Caste leader traits, now with effects matching their descriptions.
# Classes corrected: Warrior/Drone -> commander, Worker/Praetorian -> official,
# Royal Bloodline -> all classes. Uses inline_script trait/icon like LV.
#
###

############
# Positive #
############

# Worker Breed - construction, maintenance, productive drone coordination (GOVERNOR/official)
leader_trait_xenomorph_worker_breed = {
	leader_trait_type = common
	inline_script = {
		script = trait/icon
		CLASS = official
		ICON = "GFX_leader_trait_xenomorph_worker_breed"
		RARITY = common
		COUNCIL = yes
		TIER = 1
	}

	councilor_modifier = {
		planet_building_build_speed_mult = 0.15
		planet_jobs_minerals_produces_mult = 0.10
		planet_districts_cost_mult = -0.10
	}

	leader_potential_add = {
		owner = { is_hive_empire = yes }
		species = { has_trait = trait_xenomorph }
		NOT = { has_trait = leader_trait_xenomorph_worker_breed }
	}

	leader_class = { official }
	selectable_weight = @class_trait_weight
}

# Drone Caste - guides simple drones, stabilizes hive functions, internal order (COMMANDER)
leader_trait_xenomorph_drone_caste = {
	leader_trait_type = common
	inline_script = {
		script = trait/icon
		CLASS = commander
		ICON = "GFX_leader_trait_xenomorph_drone_caste"
		RARITY = common
		COUNCIL = yes
		TIER = 1
	}

	army_modifier = {
		army_morale = 0.10
		armies_upkeep_mult = -0.10
	}
	fleet_modifier = {
		ships_upkeep_mult = -0.10
		ship_disengage_chance_mult = 0.10
	}

	leader_potential_add = {
		owner = { is_hive_empire = yes }
		species = { has_trait = trait_xenomorph }
		NOT = { has_trait = leader_trait_xenomorph_drone_caste }
	}

	leader_class = { commander }
	selectable_weight = @class_trait_weight
}

# Warrior Caste - assault, terror, battlefield dominance (COMMANDER/admiral-general)
leader_trait_xenomorph_warrior_caste = {
	leader_trait_type = common
	inline_script = {
		script = trait/icon
		CLASS = commander
		ICON = "GFX_leader_trait_xenomorph_warrior_caste"
		RARITY = common
		COUNCIL = yes
		TIER = 1
	}

	fleet_modifier = {
		ship_fire_rate_mult = 0.10
		ship_weapon_damage = 0.10
	}
	army_modifier = {
		army_damage_mult = 0.15
		army_morale_damage_mult = 0.15
	}

	leader_potential_add = {
		owner = { is_hive_empire = yes }
		species = { has_trait = trait_xenomorph }
		NOT = { has_trait = leader_trait_xenomorph_warrior_caste }
	}

	leader_class = { commander }
	selectable_weight = @class_trait_weight
}

# Praetorian Lineage - defense, royal protection, suppression of deviancy (GOVERNOR/official)
leader_trait_xenomorph_praetorian_lineage = {
	leader_trait_type = common
	inline_script = {
		script = trait/icon
		CLASS = official
		ICON = "GFX_leader_trait_xenomorph_praetorian_lineage"
		RARITY = common
		COUNCIL = yes
		TIER = 1
	}

	councilor_modifier = {
		planet_stability_add = 5
		planet_crime_add = -15
		planet_jobs_unity_produces_mult = 0.05
	}
	army_modifier = {
		army_health = 0.15
		army_defense_health_mult = 0.15
		army_defense_damage_mult = 0.15
	}

	leader_potential_add = {
		owner = { is_hive_empire = yes }
		species = { has_trait = trait_xenomorph }
		NOT = { has_trait = leader_trait_xenomorph_praetorian_lineage }
	}

	leader_class = { official }
	selectable_weight = @class_trait_weight
}

# Royal Bloodline - ruler output, growth, unity (ALL CLASSES can gain it)
leader_trait_xenomorph_royal_bloodline = {
	leader_trait_type = common
	inline_script = {
		script = trait/icon
		CLASS = official
		ICON = "GFX_leader_trait_xenomorph_royal_bloodline"
		RARITY = veteran
		COUNCIL = yes
		TIER = 1
	}

	self_modifier = {
		species_leader_exp_gain = 0.10
	}
	councilor_modifier = {
		planet_jobs_unity_produces_mult = 0.10
		logistic_growth_mult = 0.10
		planet_pop_assembly_mult = 0.05
	}

	leader_potential_add = {
		owner = { is_hive_empire = yes }
		species = { has_trait = trait_xenomorph }
		NOT = { has_trait = leader_trait_xenomorph_royal_bloodline }
	}

	leader_class = { commander official scientist }
	selectable_weight = @class_trait_weight
}

# Queen Mother Immortal - the living center of the hive signal (icon fixed to royal_bloodline fallback)
leader_trait_xenomorph_queen_mother_immortal = {
	leader_trait_type = subclass
	inline_script = {
		script = trait/icon
		CLASS = official
		ICON = "GFX_leader_trait_xenomorph_royal_bloodline"
		RARITY = legendary
		COUNCIL = yes
		TIER = 1
	}
	immortal_leaders = yes
	hide_age = yes
	modification = no

	councilor_modifier = {
		country_unity_produces_mult = 0.10
		planet_stability_add = 5
		all_technology_research_speed = 0.05
	}

	leader_potential_add = {
		owner = { is_hive_empire = yes }
		species = { has_trait = trait_xenomorph }
		NOT = { has_trait = leader_trait_xenomorph_queen_mother_immortal }
	}

	leader_class = { official }
	selectable_weight = @class_trait_weight
}

###############################################
# === xenomorph_leader_traits_extended.txt ===
###############################################
###############################################
# XENOMORPH LEADER TRAITS (extended set)
#
# Xeno-flavored leader traits adapted from the Lustful Void and Calcifire
# leader-trait archetypes (dominance, breeding, body, mind, hunger), themed
# for a xenomorph hive and complementing the existing caste traits.
#
# All gate on: owner is_hive_empire + species has_trait = trait_xenomorph.
# Some additionally gate on the sex-hive civics (matriarchs_hunger /
# patriarchs_dominion). Mirrors the structure of xeno_leader_traits.txt.
###############################################

# ============================================================
# DOMINANCE / SUBMISSION  (from lv_highly_dominant / lv_highly_submissive)
# ============================================================

# --- Apex Dominant (commander/official) - adapted from lv_highly_dominant ---

# --- Brood-Servile (commander/official) - adapted from lv_highly_submissive ---

# ============================================================
# BODY / PHYSICAL  (from lv_lustful_body / lv_monstrous / equine_penis)
# ============================================================

# --- Perfect Organism (commander/official) - adapted from lv_lustful_body ---
leader_trait_xenomorph_perfect_organism = {
	leader_trait_type = common
	inline_script = {
		script = trait/icon
		CLASS = commander
		ICON = "GFX_leader_trait_xenomorph_warrior_caste"
		RARITY = veteran
		COUNCIL = yes
		TIER = 1
	}

	self_modifier = {
		species_leader_exp_gain = 0.10
	}
	fleet_modifier = {
		ship_fire_rate_mult = 0.05
		ship_evasion_mult = 0.05
	}
	army_modifier = {
		army_morale = 0.05
		army_damage_mult = 0.05
	}
	councilor_modifier = {
		planet_pop_assembly_mult = 0.05
	}

	leader_potential_add = {
		owner = { is_hive_empire = yes }
		species = { has_trait = trait_xenomorph }
		NOT = { has_trait = leader_trait_xenomorph_perfect_organism }
	}

	leader_class = { commander official }
	selectable_weight = @class_trait_weight
}

# --- Titanic Carapace (commander) - adapted from lv_monstrous (the durable bruiser) ---
leader_trait_xenomorph_titanic_carapace = {
	leader_trait_type = common
	inline_script = {
		script = trait/icon
		CLASS = commander
		ICON = "GFX_leader_trait_xenomorph_praetorian_lineage"
		RARITY = common
		COUNCIL = no
		TIER = 1
	}

	# A monstrous, near-indestructible specimen - eats a great deal, lives long.
	inline_script = {
		script = paragon/leader_resource_upkeep
		RESOURCE = food
		AMOUNT = 10
	}
	self_modifier = {
		leader_lifespan_add = 20
		species_leader_exp_gain = 0.05
	}
	army_modifier = {
		army_health = 0.15
		army_damage_mult = 0.10
	}

	leader_potential_add = {
		owner = { is_hive_empire = yes }
		species = { has_trait = trait_xenomorph }
		NOT = { has_trait = leader_trait_xenomorph_titanic_carapace }
	}

	leader_class = { commander }
	selectable_weight = @class_trait_weight
}

# --- Barbed Ovipositor (commander) - adapted from lv_commander_equine_penis (male, war) ---
leader_trait_xenomorph_commander_barbed_ovipositor = {
	leader_trait_type = common
	inline_script = {
		script = trait/icon
		CLASS = commander
		ICON = "GFX_leader_trait_xenomorph_warrior_caste"
		RARITY = veteran
		COUNCIL = no
		TIER = 1
	}

	fleet_modifier = {
		ship_weapon_damage = 0.15
		ship_weapon_range_mult = 0.20
	}
	army_modifier = {
		army_morale_damage_mult = 0.25
		army_damage_mult = 0.10
	}

	leader_potential_add = {
		owner = {
			is_hive_empire = yes
			has_civic = civic_xenomorph_patriarchs_dominion
		}
		species = { has_trait = trait_xenomorph }
		NOT = { has_trait = leader_trait_xenomorph_commander_barbed_ovipositor }
	}

	leader_class = { commander }
	selectable_weight = @class_trait_weight
}

# ============================================================
# BREEDING / ECONOMY  (from lv_rancher / lv_family_planner / babe_headmistress)
# ============================================================

# --- Broodmaster (official) - adapted from lv_rancher (livestock/breeding) ---

# --- Hatchery Overseer (official) - adapted from lv_family_planner (housing/growth) ---

# --- Pit Headmistress (official) - adapted from babe_headmistress (slave/pleasure output) ---

# ============================================================
# MIND / RESEARCH  (from lv_sexologist / babe_xeno_sexologist / lv_seductive)
# ============================================================

# --- Hostline Vivisector (scientist) - adapted from babe_xeno_sexologist (anomaly/research) ---

# --- Pheromone Sovereign (any council) - adapted from lv_seductive (unity/influence) ---

# ============================================================
# NEGATIVE TRAITS  (from lv_tormentor / lv_shocking_fetish / babe_sex_addict)
# ============================================================

# --- Rabid Instinct (commander/scientist) - adapted from lv_tormentor (aggressive but reckless) ---

# --- Queen-Dependent (any) - adapted from babe_sex_addict (fewer options, needs the hive) ---

# ============================================================
# NEW XENOMORPH PERSONALITY LEADER TRAITS (replace LV/Calcifire set)
# ============================================================

leader_trait_xenomorph_pheromone_laced_presence = {
	leader_trait_type = common
	inline_script = {
		script = trait/icon
		CLASS = official
		ICON = "GFX_leader_trait_xenomorph_royal_bloodline"
		RARITY = common
		COUNCIL = yes
		TIER = 1
	}
	self_modifier = {
		species_leader_exp_gain = 0.1
	}
	councilor_modifier = {
		planet_jobs_unity_produces_mult = 0.10
	}
	army_modifier = {
		army_morale_damage_mult = 0.1
	}
	leader_potential_add = {
		owner = { is_hive_empire = yes }
		species = { has_trait = trait_xenomorph }
		has_base_skill > 1
		NOT = { has_trait = leader_trait_xenomorph_pheromone_laced_presence }
	}
	leader_class = { commander official scientist }
	selectable_weight = @class_trait_weight
}

leader_trait_xenomorph_brood_dominant_authority = {
	leader_trait_type = common
	inline_script = {
		script = trait/icon
		CLASS = official
		ICON = "GFX_leader_trait_xenomorph_warrior_caste"
		RARITY = common
		COUNCIL = yes
		TIER = 1
	}
	councilor_modifier = {
		# 3_64: slave-produces restoration (3_59-anchored)
		planet_xenomorph_host_breeders_produces_mult = 0.05
		planet_xenomorph_breeding_toys_produces_mult = 0.05
		planet_stability_add = 3
		planet_crime_add = -10
	}
	leader_potential_add = {
		owner = { is_hive_empire = yes }
		species = { has_trait = trait_xenomorph }
		has_base_skill > 1
		NOT = { has_trait = leader_trait_xenomorph_brood_dominant_authority }
	}
	leader_class = { commander official scientist }
	selectable_weight = @class_trait_weight
}

leader_trait_xenomorph_royal_possession_instinct = {
	leader_trait_type = common
	inline_script = {
		script = trait/icon
		CLASS = official
		ICON = "GFX_leader_trait_xenomorph_royal_bloodline"
		RARITY = veteran
		COUNCIL = yes
		TIER = 1
	}
	councilor_modifier = {
		planet_xenomorph_host_breeders_produces_mult = 0.15  # 3_75: dup-merge (sum, history-canonical)
		planet_xenomorph_breeding_toys_produces_mult = 0.05
		# 3_64: slave-produces restoration (3_59-anchored)
		planet_pop_assembly_mult = 0.05
	}
	leader_potential_add = {
		owner = { is_hive_empire = yes }
		species = { has_trait = trait_xenomorph }
		has_base_skill > 1
		NOT = { has_trait = leader_trait_xenomorph_royal_possession_instinct }
	}
	leader_class = { official }
	selectable_weight = @class_trait_weight
}

leader_trait_xenomorph_hive_brood_planner = {
	leader_trait_type = common
	inline_script = {
		script = trait/icon
		CLASS = official
		ICON = "GFX_leader_trait_xenomorph_worker_breed"
		RARITY = common
		COUNCIL = yes
		TIER = 1
	}
	councilor_modifier = {
		planet_pop_assembly_mult = 0.05
		planet_building_build_speed_mult = 0.05
		logistic_growth_mult = 0.05
	}
	leader_potential_add = {
		owner = { is_hive_empire = yes }
		species = { has_trait = trait_xenomorph }
		has_base_skill > 1
		NOT = { has_trait = leader_trait_xenomorph_hive_brood_planner }
	}
	leader_class = { official }
	selectable_weight = @class_trait_weight
}

leader_trait_xenomorph_flesh_ranch_matron = {
	leader_trait_type = common
	inline_script = {
		script = trait/icon
		CLASS = official
		ICON = "GFX_leader_trait_xenomorph_drone_caste"
		RARITY = common
		COUNCIL = yes
		TIER = 1
	}
	councilor_modifier = {
		planet_xenomorph_host_breeders_produces_mult = 0.20  # 3_75: dup-merge (sum, history-canonical)
		planet_xenomorph_breeding_toys_produces_mult = 0.10
		# 3_64: slave-produces restoration (3_59-anchored)
	}
	leader_potential_add = {
		owner = { is_hive_empire = yes }
		species = { has_trait = trait_xenomorph }
		has_base_skill > 1
		NOT = { has_trait = leader_trait_xenomorph_flesh_ranch_matron }
	}
	leader_class = { official }
	selectable_weight = @class_trait_weight
}

leader_trait_xenomorph_xeno_breeding_savant = {
	leader_trait_type = common
	inline_script = {
		script = trait/icon
		CLASS = scientist
		ICON = "GFX_leader_trait_xenomorph_praetorian_lineage"
		RARITY = veteran
		COUNCIL = yes
		TIER = 1
	}
	self_modifier = {
		all_technology_research_speed = 0.05
	}
	councilor_modifier = {
		planet_researchers_society_research_produces_mult = 0.1
		planet_pop_assembly_mult = 0.05
	}
	leader_potential_add = {
		owner = { is_hive_empire = yes }
		species = { has_trait = trait_xenomorph }
		has_base_skill > 1
		NOT = { has_trait = leader_trait_xenomorph_xeno_breeding_savant }
	}
	leader_class = { scientist }
	selectable_weight = @class_trait_weight
}

leader_trait_xenomorph_brood_chamber_experimentalist = {
	leader_trait_type = common
	inline_script = {
		script = trait/icon
		CLASS = scientist
		ICON = "GFX_leader_trait_xenomorph_praetorian_lineage"
		RARITY = veteran
		COUNCIL = yes
		TIER = 1
	}
	self_modifier = {
		leader_lifespan_add = -5
	}
	councilor_modifier = {
		planet_pop_assembly_mult = 0.05
		planet_researchers_society_research_produces_mult = 0.10
	}
	leader_potential_add = {
		owner = { is_hive_empire = yes }
		species = { has_trait = trait_xenomorph }
		has_base_skill > 1
		NOT = { has_trait = leader_trait_xenomorph_brood_chamber_experimentalist }
	}
	leader_class = { scientist }
	selectable_weight = @class_trait_weight
}

leader_trait_xenomorph_pain_responsive_predator = {
	leader_trait_type = common
	inline_script = {
		script = trait/icon
		CLASS = commander
		ICON = "GFX_leader_trait_xenomorph_warrior_caste"
		RARITY = veteran
		COUNCIL = no
		TIER = 1
	}
	self_modifier = {
		leader_lifespan_add = -5
	}
	army_modifier = {
		army_damage_mult = 0.1
		army_morale = 0.1
	}
	leader_potential_add = {
		owner = { is_hive_empire = yes }
		species = { has_trait = trait_xenomorph }
		has_base_skill > 1
		NOT = { has_trait = leader_trait_xenomorph_pain_responsive_predator }
	}
	leader_class = { commander }
	selectable_weight = @class_trait_weight
}

leader_trait_xenomorph_terror_mount_commander = {
	leader_trait_type = common
	inline_script = {
		script = trait/icon
		CLASS = commander
		ICON = "GFX_leader_trait_xenomorph_warrior_caste"
		RARITY = veteran
		COUNCIL = yes
		TIER = 1
	}
	councilor_modifier = {
		# 3_64: slave-produces restoration (3_59-anchored)
		planet_xenomorph_host_breeders_produces_mult = 0.05
		planet_xenomorph_breeding_toys_produces_mult = 0.05
	}
	army_modifier = {
		army_morale_damage_mult = 0.2
	}
	leader_potential_add = {
		owner = { is_hive_empire = yes }
		species = { has_trait = trait_xenomorph }
		has_base_skill > 1
		NOT = { has_trait = leader_trait_xenomorph_terror_mount_commander }
	}
	leader_class = { commander }
	selectable_weight = @class_trait_weight
}

leader_trait_xenomorph_monstrous_brood_icon = {
	leader_trait_type = common
	inline_script = {
		script = trait/icon
		CLASS = commander
		ICON = "GFX_leader_trait_xenomorph_warrior_caste"
		RARITY = veteran
		COUNCIL = no
		TIER = 1
	}
	army_modifier = {
		army_damage_mult = 0.1
		army_defense_damage_mult = 0.15
	}
	leader_potential_add = {
		owner = { is_hive_empire = yes }
		species = { has_trait = trait_xenomorph }
		has_base_skill > 1
		NOT = { has_trait = leader_trait_xenomorph_monstrous_brood_icon }
	}
	leader_class = { commander }
	selectable_weight = @class_trait_weight
}
